package ph.gov.marikina.mcsmtms.tests;

import static org.junit.Assert.assertTrue;

import java.util.List;

import org.apache.log4j.Logger;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import ph.gov.marikina.mcsmtms.dao.ActivityFeedsDAO;
import ph.gov.marikina.mcsmtms.domain.ActivityFeeds;

public class ActivityFeedsDAOImplTest {

	Logger log = Logger.getLogger(ActivityFeedsDAOImplTest.class);

	/** The context. */
	private static ApplicationContext springContext = new ClassPathXmlApplicationContext(
			"spring/test-spring-config.xml");
	
	/** The application context. */
//	private static ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
//			"applicationContext.xml");
	
	@Before
	public void setUp() throws Exception {
	}

	
	@Test
	public void testGetActivityFeedss() {
		//fail("Not yet implemented");
		ActivityFeedsDAO ActivityFeedsDAO = (ActivityFeedsDAO) springContext
				.getBean("activityFeedsDAO");
		List<ActivityFeeds> activityFeedsList = ActivityFeedsDAO.getAllActivityFeeds();
		
		for(ActivityFeeds activityFeeds : activityFeedsList) {
			System.out.println(activityFeeds.getId() + " " + activityFeeds.getRemarks() + " " + activityFeeds.getLoggedBy());
		}
		
		assertTrue(activityFeedsList.size() > 0);
	}

}
